gotoObject issue |
Re: gotoObject(absno,m) Easiest probably is after using gotoObject use: o=current |
Re: gotoObject(absno,m) rain_bow - Fri Feb 03 09:44:24 EST 2012 |
Re: gotoObject(absno,m) It seems I missed something, but I see no reason why the "current" object would change unless you changed it.
Object oCurr1 = current
Object obj
int MaxValue = 0, Max
for obj in entire mod do
{ Max = obj.SomeIntAttribute
if (Max > MaxValue) then MaxValue = Max
}
Object oCurr2 = current
if (oCurr1 != oCurr2) then Louie is wrong
do something with MaxValue
|
Re: gotoObject(absno,m) llandale - Fri Feb 03 10:58:26 EST 2012 It seems I missed something, but I see no reason why the "current" object would change unless you changed it.
Object oCurr1 = current
Object obj
int MaxValue = 0, Max
for obj in entire mod do
{ Max = obj.SomeIntAttribute
if (Max > MaxValue) then MaxValue = Max
}
Object oCurr2 = current
if (oCurr1 != oCurr2) then Louie is wrong
do something with MaxValue
This may result in the current object changing, I don't know. The for gotoObject(absno,m), I first do a "filtering off" command which exposes all objects in the module. |
Re: gotoObject(absno,m) lahines - Fri Feb 03 11:25:52 EST 2012 Actually you need something like this; but I see this very old function needs a little work on that "view" thing it does:
//*************************
void fSetStandardDisplay(Module mod, bool DoView)
{ // Set the module to the standard display, showing all objects
// in the natural hierarchical order,
// and optionally load the module's standard view.
string ViewName
// Load the standard module view, if it
// exists in the module.
if (null mod) return
Module PrevCurr = fSetCurrMod(mod)
if (DoView)
{ for ViewName in views mod do
{ if (ViewName == cl_vStandard and
ViewName != currentView(mod))
load view ViewName
}
}
filtering off
graphics off
outlining off
showPictures on
showTables on
sorting off
showDeletedObjects(false)
level(0)
refresh mod
fSetCurrMod(PrevCurr) // reset to previous current module
} // end fSetStandardDisplay()
|